package com.xmx.dao;

import com.xmx.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jianzi
 * @since 2022-08-10
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
    //1.用户登录
    User userlogin(@Param("username") String username, @Param("password") String password);
    //2用戶注冊
    int userregist(User user);
    //3用戶显示
    List<User> findAll();
    //4.删除
    int delete(@Param("uid")Integer uid);
    //5.更新
    int update(@Param("uid")Integer uid);
    //6.查找id
    User findbyid(@Param("uid")Integer uid);
}
